import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import DaiShou from '../views/dingd/DaiShou.vue'
import DaiZhi from '../views/dingd/DaiZhi.vue'
import DingDetaill from '../views/dingd/DingDetaill.vue'
Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    redirect: '/home/liser',
    children:[
      {
        path:'liser',
        component: () => import(/* webpackChunkName: "about" */ '../views/Firzi/ListTo.vue')
      },
      {
        path:'phone',
        component: () => import(/* webpackChunkName: "about" */ '../views/Firzi/Phone.vue')
      },
      {
        path:'inter',
        component: () => import(/* webpackChunkName: "about" */ '../views/Firzi/Inter.vue')
      },
      {
        path:'tv',
        component: () => import(/* webpackChunkName: "about" */ '../views/Firzi/Tv.vue')
      },
      {
        path:'homed',
        component: () => import(/* webpackChunkName: "about" */ '../views/Firzi/Homed.vue')
      },
      {
        path:'computed',
        component: () => import(/* webpackChunkName: "about" */ '../views/Firzi/Computed.vue')
      }
    ]
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/xq',
    name: 'xq',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Xq.vue')
  },
  {
    path: '/shopping',
    name: 'shopping',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Shopping.vue')
  },
  {
    path: '/user',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/User.vue')
  },
  {
    path: '/details',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Details.vue')
  },
  {
    path: '/listpl',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/list.vue')
  },
  {
    path: '/shopping',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Shopping.vue')
  },
  {
    path: '/commentList',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/commentList.vue')
  },
  {
    path: '/addren-ding',
    component: () => import(/* webpackChunkName: "about" */ '../views/AddrenDing.vue')
  },
  {
    path:"/create-add",
    component: () => import(/* webpackChunkName: "about" */ '../views/CreateAdd.vue')
  },
  {
    path:"/my-ding",
    component: () => import(/* webpackChunkName: "about" */ '../views/MyDing.vue'),
    children:[
      {
        path:'dai-shou',
        component: DaiShou,
      },
      {
        path:'dai-zhi',
        component: DaiZhi,
      }
    ]
  },
  {
    path: '/add-List',
    component: ()=> import('../views/AddList.vue')
  },
  {
    path:'/dang-detaill',
    component: DingDetaill
  }
]

const router = new VueRouter({
  routes
})

export default router
